# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

flutter_application_path = './flutter_module/'
eval(
  File.read(
    File.join(
      flutter_application_path, 
      '.ios', 
      'Flutter', 
      'podhelper.rb'
    )
  ), 
  binding
)

def import_react_native()
  react_native_node_modules_path = './react_native_module/node_modules/react-native/'
  pod 'React', :path => react_native_node_modules_path, :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => react_native_node_modules_path + 'ReactCommon/yoga'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => react_native_node_modules_path + 'third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => react_native_node_modules_path + 'third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => react_native_node_modules_path + 'third-party-podspecs/Folly.podspec'

end

target 'App' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  import_react_native()

  # Pods for App
  pod 'QMUIKit', '= 3.1.0'
  pod 'Masonry', '= 1.1.0'
  pod 'MJExtension'
  pod 'AFNetworking', '~> 3.0'
  
  # Swift
  pod 'SnapKit', '= 4.0.0'
  pod 'Moya/RxSwift', '~> 12.0'
  pod 'Moya-ObjectMapper/RxSwift'

  target 'AppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'AppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end
